<template>
  <div>
    购物车
  </div>
</template>

<script>
import Vue from 'vue'
export default {
  data () {
    return {

 
    }
  },
  beforeRouteEnter(to,from,next){
     let token = localStorage.getItem('token')
    if(token){
      next()
    }else{
      Vue.prototype.$toast('请先登录！')
      setTimeout(() => {
         next('/user')
      },800);
     
    }
  }
}
</script>
 
<style lang = "less" scoped>
  
</style>